﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MainSite.Master" AutoEventWireup="true" CodeBehind="UserManagement.aspx.cs" Inherits="BSCMFF.Web.Pages.Administration.UserManagement" culture="auto" meta:resourcekey="PageResource1" uiculture="auto" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

    <%--<asp:ImageButton ID="ImageButtonAddOneUser" runat="server" ImageUrl="~/Images/addOneUser.png" AlternateText="Create Employee" />--%>
    <%--<asp:ImageButton ID="ImageButtonImportUsers" runat="server" PostBackUrl="~/Pages/Administration/UserImport.aspx"
        ImageUrl="~/Images/import.png" AlternateText="Import Employees" 
        />
    
    
     
    <br />

    
    <br />--%>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" 
        Skin="Windows7" meta:resourcekey="RadAjaxLoadingPanel1Resource1">
    </telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" 
        LoadingPanelID="RadAjaxLoadingPanel1" HorizontalAlign="NotSet" 
        meta:resourcekey="RadAjaxPanel1Resource1">
    <telerik:RadGrid ID="RadGrid1" runat="server" 
        DataSourceID="EntityDataSourceUsers"  
        CellSpacing="0" GridLines="None"
        oninsertcommand="RadGrid1_InsertCommand" 
        onupdatecommand="RadGrid1_UpdateCommand" 
        ondeletecommand="RadGrid1_DeleteCommand" 
         onitemcommand="RadGrid1_ItemCommand" AutoGenerateColumns="False" 
       
        AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" 
        meta:resourcekey="RadGrid1Resource1" onitemdatabound="RadGrid1_ItemDataBound" 
         >
        <MasterTableView DataKeyNames="ID" EditMode="PopUp" 
              CommandItemDisplay="Top"
            DataSourceID="EntityDataSourceUsers">
            <CommandItemSettings ExportToPdfText="Export to PDF" 
                AddNewRecordText="Add New User" ShowRefreshButton="False" />
            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
            </RowIndicatorColumn>
            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
            </ExpandCollapseColumn>
            <Columns>
                   
                    <telerik:GridBoundColumn DataField="Firstname" 
                        FilterControlAltText="Filter Firstname column" HeaderText="Firstname" 
                        SortExpression="Firstname" UniqueName="Firstname" 
                        meta:resourcekey="GridBoundColumnResource1">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Lastname" 
                        FilterControlAltText="Filter Lastname column" HeaderText="Lastname" 
                        SortExpression="Lastname" UniqueName="Lastname" 
                        meta:resourcekey="GridBoundColumnResource2">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Email" 
                        FilterControlAltText="Filter Email column" HeaderText="Email" 
                        SortExpression="Email" UniqueName="Email" 
                        meta:resourcekey="GridBoundColumnResource3">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Role.Name" HeaderText="Role" 
                        SortExpression="Role.Name" UniqueName="Role.Name" 
                        FilterControlAltText="Filter Role.Name column" 
                        meta:resourcekey="GridBoundColumnResource4">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Login" 
                        FilterControlAltText="Filter Login column" HeaderText="Login" 
                        SortExpression="Login" UniqueName="Login" 
                        meta:resourcekey="GridBoundColumnResource5">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Password" Visible="False"
                        FilterControlAltText="Filter Password column" HeaderText="Password" 
                        SortExpression="Password" UniqueName="Password" 
                        meta:resourcekey="GridBoundColumnResource6">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="EmployeeID" 
                        FilterControlAltText="Filter EmployeeID column" HeaderText="EmployeeID" 
                        SortExpression="EmployeeID" UniqueName="EmployeeID" 
                        meta:resourcekey="GridBoundColumnResource7">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="SBU.Name" 
                        FilterControlAltText="Filter SBU.Name column" HeaderText="Department" 
                        SortExpression="SBU.Name" UniqueName="SBU.Name" 
                        meta:resourcekey="GridBoundColumnResource8">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Job_Position" 
                        FilterControlAltText="Filter Job_Position column" HeaderText="Job_Position" 
                        SortExpression="Job_Position" UniqueName="Job_Position" 
                        meta:resourcekey="GridBoundColumnResource9">
                    </telerik:GridBoundColumn>
                    <telerik:GridButtonColumn CommandName="Select" Text="Show" 
                        UniqueName="Select" FilterControlAltText="Filter Select column" 
                        meta:resourcekey="GridButtonColumnResource1">
                    </telerik:GridButtonColumn>
                    <telerik:GridButtonColumn CommandName="Edit" Text="Edit"
                        UniqueName="Edit" FilterControlAltText="Filter Edit column" 
                        meta:resourcekey="GridButtonColumnResource2">
                    </telerik:GridButtonColumn>
                    <telerik:GridButtonColumn CommandName="Delete" Text="Delete"  
                        UniqueName="Delete" FilterControlAltText="Filter Delete column" 
                        meta:resourcekey="GridButtonColumnResource3">
                    </telerik:GridButtonColumn>
                </Columns>
                <EditFormSettings EditFormType="WebUserControl" 
                UserControlName="~/UserControls/Details/UserDetails.ascx" >
                    <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                    </EditColumn>
                    <PopUpSettings Modal="True" CloseButtonToolTip="false" Width="500px" />
                </EditFormSettings>
                
        </MasterTableView>
         <FilterMenu EnableImageSprites="False">
         </FilterMenu>
        <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
        </HeaderContextMenu>
    </telerik:RadGrid>
   
   
   
</telerik:RadAjaxPanel>
    
 <asp:EntityDataSource ID="EntityDataSourceUsers" runat="server" 
        ConnectionString="name=BSCEntities" DefaultContainerName="BSCEntities" 
        EnableDelete="True" EnableFlattening="False" EnableInsert="True" 
        EnableUpdate="True" EntitySetName="Users" Include="Role, SBU" 
        EntityTypeFilter="" Select="">
    </asp:EntityDataSource>

<asp:EntityDataSource ID="EntityDataSourceRoles" runat="server" 
    ConnectionString="name=BSCEntities" DefaultContainerName="BSCEntities" 
    EnableFlattening="False" EntitySetName="Roles" EntityTypeFilter="" Select="">
</asp:EntityDataSource>
<asp:EntityDataSource ID="EntityDataSourceDepartments" runat="server" 
    ConnectionString="name=BSCEntities" DefaultContainerName="BSCEntities" 
    EnableFlattening="False" EntitySetName="SBUs" Select="it.[SBU_ID], it.[Name]" 
        EntityTypeFilter="">
</asp:EntityDataSource>

</asp:Content>
